Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 11 pull requests #66875

Closed
wants to merge 56 commits into from
Closed

Conversation

RalfJung
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

cjgillot and others added 30 commits November 24, 2019 23:21
…andler] directly

The "continue" in the name was really confusing; it sounds way too much like "resume" which is a totally different concept around panics.
The construction of the GlobalCtxt is moved from a generator's stack to
the Queries struct.  Since the GlobalCtxt requires the HIR Forest and the
arenas to live longer, those are moved into Queries the same way.

The resulting handling of objects is more brittle, because consumers of
the Once objects need to be careful of their initialisation.
Dylan-DPC and others added 19 commits November 28, 2019 01:26
fix clippy

allow customising ty::TraitRef's printing behavior

fix clippy

stylistic fix
Fixed the documentation for any as is a trait rather than a type.
Rephrase docs in for ptr

These methods can be supplied with NULL just fine, this is the whole point of `Option<&T>` return type.
Allow customising ty::TraitRef's printing behavior

This pr allows to explicitly choose which representation of `TraitRef` (`<T as Trait<U>>` or `Trait<U>`) you want to print. `Debug` and `Display` representations of `TraitRef` now match.

Closes rust-lang#59188.
Panic machinery comments and tweaks

This is mostly more comments, but I also renamed some things:
* `BoxMeUp::box_me_up` is not terribly descriptive, and since this is a "take"-style method (the argument is `&mut self` but the return type is fully owned, even though you can't tell from the type) I chose a name involving "take".
* `continue_panic_fmt` was very confusing as it was entirely unclear what was being continued -- for some time I thought "continue" might be the same as "resume" for a panic, but that's something entirely different. So I renamed this to `begin_panic_handler`, matching the `begin_panic*` theme of the other entry points.

r? @Dylan-DPC @SimonSapin
…r=oli-obk

rustc: move mir::SourceScopeLocalData to a field of SourceScopeData.

By having one `ClearCrossCrate<SourceScopeLocalData>` for each scope, as opposed to a single `ClearCrossCrate` for all the `SourceScopeLocalData`s, we can represent the fact that some scopes have `SourceScopeLocalData` associated with them, and some don't.

This is useful when doing MIR inlining across crates, because the `ClearCrossCrate` will be `Clear` for the cross-crate MIR scopes and `Set` for the local ones.

Also see rust-lang#66203 (comment) for some context around this approach.

Fixes rust-lang#51314.
Handle GlobalCtxt directly from librustc_interface query system

This PR constructs the `GlobalCtxt` as a member of the `Queries` in librustc_interface.
This simplifies the code to construct it, at the expense of added complexity in the query control flow.
This allows to handle the arenas directly from librustc_interface.

Based on rust-lang#66707

r? @Zoxc
…=cramertj

Record temporary static references in generator witnesses

Closes rust-lang#66695

* Record the pointer to static's type in MIR.
* Normalize the static's type (so that constants can be compared correctly).
…ssage-assigner, r=Dylan-DPC

Clarifies how to tag users for assigning PRs

Clarifies language of where to put `r?` text to assign a particular user. Mostly a follow up of [this discussion](rust-lang#66797 (comment)).
Clarify `{f32,f64}::EPSILON` docs

The doc for `EPSILON` says:
>  This is the difference between `1.0` and the next **largest** representable number.

Which is a bit unclear.

[Wikipedia](https://en.wikipedia.org/wiki/Machine_epsilon) says
> Machine epsilon is defined as the difference between 1 and the next **larger** floating point number

So this PR update the docs to match the Wikipedia version.

The original PR also has this in a [comment](rust-lang#50919 (comment)).
…i-obk

Miri: do not consider memory allocated by caller_location leaked

Fixes rust-lang/miri#1071

r? @oli-obk

I am not sure if this is the best approach, but it certainly is the easiest.
Minor documentation fix

Fixed the documentation for any as is a trait rather than a type.
@RalfJung
Copy link
Member Author

@bors r+ rollup=never p=11

@bors
Copy link
Contributor

bors commented Nov 29, 2019

📌 Commit 7d0b1ab has been approved by RalfJung

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 29, 2019
@bors
Copy link
Contributor

bors commented Nov 29, 2019

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout rollup-401x5k8 (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self rollup-401x5k8 --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging src/librustc_mir/transform/promote_consts.rs
Auto-merging src/librustc_mir/transform/const_prop.rs
Auto-merging src/librustc_mir/shim.rs
CONFLICT (content): Merge conflict in src/librustc_mir/shim.rs
Auto-merging src/librustc_mir/build/scope.rs
Auto-merging src/librustc_mir/build/mod.rs
Auto-merging src/librustc/mir/visit.rs
Auto-merging src/librustc/mir/mod.rs
Automatic merge failed; fix conflicts and then commit the result.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 29, 2019
@bors
Copy link
Contributor

bors commented Nov 29, 2019

☔ The latest upstream changes (presumably #66321) made this pull request unmergeable. Please resolve the merge conflicts.

@RalfJung
Copy link
Member Author

Ah, well.

@RalfJung RalfJung closed this Nov 29, 2019
@RalfJung RalfJung deleted the rollup-401x5k8 branch November 30, 2019 07:50
@JohnTitor JohnTitor added the rollup A PR which is a rollup label Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet